﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;

namespace lCash
{
    static class Web
    {
        private static WebRequest getRequest;        
        public static string GetData(string siteURL)
        {
            WebResponse wResp;
            Stream stream;
            StreamReader sReader;
            if (siteURL.Length != 0)
            {
                getRequest = WebRequest.Create(siteURL);
                wResp = getRequest.GetResponse();
                stream = wResp.GetResponseStream();
                sReader = new StreamReader(stream);
                siteURL = "";
                return sReader.ReadToEnd();
            }
            return "Не задана строка запроса!";
        }
    }
}
